
#include "NebulaMemory.h"


//override new/delete operations

#if USE_NEBULA_MEMORY

__forceinline 
void* operator new(size_t size)
{
	return NebulaMemory::Alloc(size);
}

__forceinline
void* operator new[](size_t size)
{
	return NebulaMemory::Alloc(size);
}

__forceinline
void operator delete(void* p)
{
	return NebulaMemory::Free(p);
}

__forceinline
void operator delete[](void* p)
{
	return NebulaMemory::Free(p);
}


#define n_new(type) new type
#define n_new_array(type, size) new type[size]
#define n_delete(p) delete p
#define n_delete_array(p) delete[] p

#endif
